/**
 * 
 */
package com.gopay.common.constants.bank;


/**
 * @CuccPayOrderStatus.java
 * @author Ryan
 * @2013-11-14 下午3:30:45  www.gopay.com.cn Inc.All rights reserved.
 */
public enum CuccPayOrderStatus {

    ORDER_STATE_DEALING("0","联通沃支付平台处理中"),
    ORDER_STATE_SUCCESS("1","交易成功"),
    ORDER_STATE_CLOSED("2","订单关闭(失败)"),
    ORDER_STATE_UNCONFIRMED("3","付款未确认"),
    ORDER_STATE_REVOCATION("8","订单被撤销");
    
    private String key;
    public String value;

    CuccPayOrderStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (CuccPayOrderStatus info : CuccPayOrderStatus.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }
}
